<%@page import="net.tanesha.recaptcha.ReCaptchaFactory"%>
<%@page import="net.tanesha.recaptcha.ReCaptcha"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<section id="registration">
	<div class="container register">
		<h1>Register on Question-Bank</h1>
		<%
		session.removeAttribute("user");
		
		
		%>
		<form action="insert.htm" name="registrationForm"
			id="registrationForm" method="post">
			<div class="dvErrorMain" id="error">${error}</div>
			<div class="regSection personalInfo">
				<h3>Your Personal Information</h3>
				<input type="text" name="name" value="${user.name}" placeholder="Your Name">
				<div class="dvError" id="nameError">${nameError}</div>
				<input type="text" name="email" value="${user.email}"
					placeholder="Your E-mail Address">
				<div class="dvError" id="emailError">${emailError}</div>
			</div>
			<div class="regSection password">
				<h3>Your Password</h3>
				<input type="password" name="password" value=""
					placeholder="Your Password">
				<div class="dvError" id="passwordError">${passwordError}</div>
				<input type="password" name="confirm" value=""
					placeholder="Confirm Password">
				<div class="dvError" id="confirmPasswordError">${confirmPasswordError}</div>
			</div>
			<div id="captcha">
				<%
	        			ReCaptcha c = ReCaptchaFactory.newReCaptcha(
	            		"6Lel2PsSAAAAALn4XzUKQ3Gm-H11WGzm0bRnGr14",
	            		"6Lel2PsSAAAAAGpmnVpRQURTVFlPXeVv4b_CUXbF",
	            		false);
	        			out.print(c.createRecaptchaHtml(null, null));
	        	%>
			</div>
			<p class="terms">
				<label> <input type="checkbox" name="accept" id="accept">
					I accept <a href="#">Question-Bank</a> Terms & Condition.
				</label>
			</p>
			
			<p class="submit">
				<input type="submit" id="signUp" name="submit" value="Sign Up">
			</p>
		</form>
	</div>
</section>